package com.yunsc.order.vo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yunsc.common.serializer.TimestampToDateSerializer;
import com.yunsc.order.entity.YunscOrderAddressEntity;
import com.yunsc.store.entity.YunscExpressEntity;
import com.yunsc.store.entity.YunscUserEntity;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @version: 1.0
 * @Author: adan
 * @description: 订单详情VO
 * @date: 2024-01-31 18:45
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
public class OrderDetailVO implements Serializable {

    /**
     * 订单ID
     */
    @TableId
    private Integer orderId;
    /**
     * 订单号
     */
    private String orderNo;
    /**
     * 订单类型(10实物订单)
     */
    private Integer orderType;
    /**
     * 商品总金额(不含优惠折扣)
     */
    private String totalPrice;
    /**
     * 订单金额(含优惠折扣)
     */
    private String orderPrice;
    /**
     * 优惠券ID
     */
    private Integer couponId;
    /**
     * 优惠券抵扣金额
     */
    private String couponMoney;
    /**
     * 积分抵扣金额
     */
    private String pointsMoney;
    /**
     * 积分抵扣数量
     */
    private Integer pointsNum;
    /**
     * 实际付款金额(包含运费)
     */
    private String payPrice;
    /**
     * 后台修改的订单金额(差价)
     */
    private Object updatePrice;
    /**
     * 买家留言
     */
    private String buyerRemark;
    /**
     * 支付方式(余额/微信/支付宝)
     */
    private String payMethod;
    /**
     * 付款状态(10未付款 20已付款)
     */
    private Integer payStatus;
    /**
     * 付款时间
     */
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer payTime;
    /**
     * 第三方交易记录ID
     */
    private Integer tradeId;
    /**
     * 配送方式(10快递配送 20门店自提 30无需配送)
     */
    private Integer deliveryType;
    /**
     * 运费金额
     */
    private String expressPrice;
    /**
     * 发货状态(10未发货 20已发货 30部分发货)
     */
    private Integer deliveryStatus;
    /**
     * 发货时间
     */
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer deliveryTime;
    /**
     * 收货状态(10未收货 20已收货)
     */
    private Integer receiptStatus;
    /**
     * 收货时间
     */
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer receiptTime;
    /**
     * 订单状态(10进行中 20取消 21待取消 30已完成)
     */
    private Integer orderStatus;
    /**
     * 赠送的积分数量
     */
    private Integer pointsBonus;
    /**
     * 商家备注
     */
    private String merchantRemark;
    /**
     * 订单是否已结算(0未结算 1已结算)
     */
    private Integer isSettled;
    /**
     * 订单结算时间
     */
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer settledTime;
    /**
     * 是否已评价(0否 1是)
     */
    private Integer isComment;
    /**
     * 订单来源(10普通订单 20砍价订单 30秒杀订单)
     */
    private Integer orderSource;
    /**
     * 来源记录ID
     */
    private Integer orderSourceId;
    /**
     * 来源记录的参数 (json格式)
     */
    private String orderSourceData;
    /**
     * 来源客户端 (APP、H5、小程序等)
     */
    private String platform;
    /**
     * 用户ID
     */
    private Integer userId;
    /**
     * 是否删除
     */
    private Integer isDelete;
    /**
     * 商城ID
     */
    private Integer storeId;
    /**
     * 创建时间
     */
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer createTime;
    /**
     * 更新时间
     */
    @JsonSerialize(using = TimestampToDateSerializer.class)
    private Integer updateTime;
    /**
     * 订单地址
     */
    private YunscOrderAddressEntity address;

    // 订单配送方式
    private List<OrderDeliveryVO> delivery;
    // 订单地址
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private YunscExpressEntity express;

    // 订单商品
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<OrderGoodsVO> goods;

    // 订单用户
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private YunscUserEntity user;

    // 订单状态文字描述
    private String stateText;

    // @JsonInclude(JsonInclude.Include.NON_EMPTY)
    // private List<YunscOrderEntity> goodsList;
}
